<#assign contextPath=springMacroRequestContext.getContextPath()/>
<#import "/public/frame/main.html" as frame/>
<@frame.head "南航明珠商城-生成商品二维码"></@frame.head>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i>后台管理中心 <span class="c-gray en">&gt;</span>商品管理 <span class="c-gray en">&gt;</span>生成商品二维码<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
  <div class="text-c">
    <form action="${contextPath}/qrcodeController/uploadExcl" enctype="multipart/form-data" method="post" id="submitFormData">
      <input id="text" type="hidden" onchange="makeCode()"/>
      <table class="table">
        <tr style="height: 50px;">
          <td style="width: 150px;">请输入二维码的渠道标识：</td>
          <td>
          	<input id="identifing" name="identifing" class="input-text radius" style="width: 300px;" maxlength="50"/>
          </td>
        </tr>
        <tr style="height: 50px;">
          <td>请选择生成二维码的尺寸：</td>
          <td>
            <select id="chooseQrsize" name="chooseQrsize" onchange="changeWH(this.value)" class="select" style="width: 300px;">
			  <option value="">请选择二维码尺寸</option>
			  <option value="2">200*200</option>
			  <option value="4">400*400</option>
			  <option value="6">600*600</option>
			  <option value="8">800*800</option>
		    </select>
          </td>
        </tr>
        <tr style="height: 50px;">
          <td>生成二维码平台：</td>
          <td>
          	<input type="radio" value="P" name="n2" checked="checked"/>PC端
          	<input type="radio" value="M" name="n2"/>移动端
          </td>
        </tr>
        <tr style="height: 50px;">
          <td>生成商品二维码类型：</td>
          <td>
          	<input type="radio" value="A" name="n1" onclick="showIndexPage()" checked="checked"/>商城首页
          	<input type="radio" value="B" name="n1" onclick="showPidinput()"/>单个商品 
          	<input type="radio" value="C" name="n1" onclick="showUploadDiv()"/>多个商品
          </td>
        </tr>
        <tr class = "C2" style="display: none; height: 50px;">
        	<td>请输入商品的商城编号：</td>
        	<td>
        	  <input class="input-text radius" style="width: 300px;" onkeyup="value=value.replace(/[^\d]/g,'')" id="pid" name="pruductid"/>
        	</td>
        </tr>
        <tr class = "C3" style="display: none; height: 50px;">
        	<td colspan="2">
        	     商品二维码：<a href="${contextPath}/qrcodeController/exportModel" style="text-decoration: none;border-color: gray;"><font color="green">模版下载</font></a>
        	</td>
        </tr>
        <tr class = "C3" style="display: none; height: 50px;">
        	<td colspan="2">
<<<<<<< .mine
        	     上传文件(仅支持03版本Excel)：<input type="file" name="addexcl" id="addexcl" accept="application/vnd.ms-excel"/>
=======
        	     上传文件(仅支持03版本excel)：<input type="file" name="addexcl" id="addexcl" accept="application/vnd.ms-excel"/>
>>>>>>> .theirs
        	</td>
        </tr>
        <tr class="C1" style="height: 50px;">
          <td colspan="2">
            <input onclick="makeCodes();" class="btn btn-primary radius" type="button" value="生成二维码" />
          </td>
        </tr>
        <tr class="C3" style="height: 50px; display: none;">
          <td colspan="2">
          	<input onclick="submitDate();" class="btn btn-primary radius" type="button" value="生成二维码" />
          </td>
        </tr>
        <tr>
          <td colspan="2">
          	<div id="qrcode" style="width:100px; height:100px; margin-top:15px;"></div><div id="showImg" style="display: none;"><a id="downImg" href="" download="">下载图片</a></div>
          </td>
        </tr>
      </table>
    </form>
  </div>
</div>
<@frame.end "default"></@frame.end>
<script type="text/javascript" src="${contextPath}/resources/js/qrcode/qrcode.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/qrcode/qrcodeinfo.js"></script>
<script type="text/javascript">
	var path = "${contextPath}";
</script>